<?php

namespace Respect\Http\Module;

use Respect\Http\Bootstrappable;
use Respect\Environment\EnvironmentableInterface;

class Referrer implements Bootstrappable
{

    public $referrer;

    public static function qualify(EnvironmentableInterface $env)
    {
        return $env('HTTP_REFERER') ? new static($env) : false;
    }

    public function __construct(EnvironmentableInterface $env)
    {
        $this->referrer = $env('HTTP_REFERER');
    }

}
